//Francisco "Kiko" Olvera
//Handles input
//Switches between menu and player states
//Controller.h

#pragma once
#include "Sprite.h"
#include "input.h"
#include "Game.h"
#include "Menu.h"
#include "EndGame.h"
#include "ENUM.h"

class Board;
class Player;

class Controller
{
private:
	Sprite sprite;
	SpriteInfo blank;
	Input input;
	Menu menu;
	Game game;
	EndGame endGame;
	int winningPlayer, numPlayers;
	int* players;
	CONTROLLER_STATE state;
	char buffer[64];
private:
	Controller(){}
public:
	//singleton
	inline static Controller* Instance(){static Controller instance; return &instance;}
public:
	void Init(HWND, HINSTANCE);
public:
	void Update();
	void Render();
public:
	SpriteInfo* getBlankSprite()	{return &blank;}
	Board* getBoard();
	void setPlayers(int*);
	Player* getPlayers();
	char* getWinningPlayerPic();
	int getNumPlayers();
	void setWinningPlayer(int);
	int CorrectPlayerSound(int, int);
};